import { defineStore } from "pinia";
import { computed } from "vue";
import { useStore as usePermissionStore } from "@/store/permission";
import { constantRoutes } from "@/router";
export const useStore = defineStore('menu', () => {
  const permissionStore = usePermissionStore();
  const menu_list = computed(() => {
    return [...constantRoutes.filter((x:any) => !x.hidden), ...(permissionStore.state?.addRoutes || []).filter(x => !x.hidden)];
  })
  return {
    menu_list,
  }
})